package com.itfreer.esb.entity;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Index;
import javax.persistence.Table;

import org.springframework.beans.BeanUtils;

import com.itfreer.esb.proxy.entity.AccessCountByServerEntity;
import com.itfreer.form.api.JdbcBaseEntity;

/**
 * 访问量统计
 * @author gj
 *
 */
@Entity(name = "esb_count_server_view")
@Table(indexes = { })
public class JdbcAccessCountByServerEntity implements JdbcBaseEntity<AccessCountByServerEntity>, Serializable { 
	private static final long serialVersionUID = 4673423560339517162L;
	/**
	 * 服务名称
	 */
	@Id
	@Column(name = "s_server", length = 200, nullable = false)
	private String server;
	
	/**
	 * 访问统计
	 */
	@Column(name = "i_count")
	private Integer count;

	public String getServer() {
		return server;
	}

	public void setServer(String server) {
		this.server = server;
	}

	public Integer getCount() {
		return count;
	}

	public void setCount(Integer count) {
		this.count = count;
	}

	@Override
	public void from(AccessCountByServerEntity t) {
		BeanUtils.copyProperties(t, this);
		
	}

	@Override
	public void setId(String arg0) {
		this.server = arg0;
	}

	@Override
	public AccessCountByServerEntity toEntity() {
		AccessCountByServerEntity toEntity = new AccessCountByServerEntity();
		BeanUtils.copyProperties(this, toEntity);
		return toEntity;
	}
	
}
